package com.xiaoqi.lk07_service_1.local;

import android.app.Service;
import android.content.Intent;
import android.os.Binder;
import android.os.IBinder;
import android.util.Log;

import androidx.annotation.Nullable;

// 组件必须先注册
public class MyService extends Service {


    @Override
    public void onCreate() {
        Log.i("Service","onCreate");
        super.onCreate();
    }

    @Override
    public void onStart(Intent intent, int startId) {
        Log.i("Service","onStart");
        super.onStart(intent, startId);
    }

    @Override
    public int onStartCommand(Intent intent, int flags, int startId) {
        Log.i("Service","onStartCommand");
        return super.onStartCommand(intent, flags, startId);
    }

    @Override
    public void onDestroy() {
        Log.i("Service","onDestroy");
        super.onDestroy();
    }


    @Nullable
    @Override
    public IBinder onBind(Intent intent) {
        Log.i("Service","onBind");
        return new Binder();
    }

    @Override
    public boolean onUnbind(Intent intent) {
        Log.i("Service","onUnbind");
        return super.onUnbind(intent);
    }


}
